<template>
 <section id="dz_me" class="page in " data-title="">    
   
   <div class="container">       
    <header>
      <p>我的</p>
    </header>  
    
    <div class="me-wrap">
      
      <div class="me-info icon meBg flex-wrap-start">
        
        <img :src="user.avatar" alt="">      
        <div class="me-content"><span>工号</span><span>{{user.user}}</span></div>
      </div>
      
      <div class="me-ul">
        <navigator url="/pages/personal/history" open-type="navigate" class="me-li">
         <span class="icon me1">历史方案</span> 
        </navigator>
 
        <navigator url="/pages/personal/marketlist" open-type="navigate" class="me-li">
         <span class="icon me2">市场预测</span> 
         </navigator>
 
        <navigator url="/pages/peer/peer" open-type="navigate" class="me-li">
         <span class="icon me3">同行数据录入</span> 
        </navigator>

        <navigator url="/pages/personal/updatepwd" open-type="navigate" class="me-li">
          <span class="icon me4">修改密码</span>
        </navigator>

        <div class="me-li">
          <span class="icon me5" @click="nfQuit">退出</span>
        </div> 
      </div>
    </div>  

      <!-- 底部菜单 -->
      <my-header  :menuitem="3"></my-header>

   </div>   
</section>

</template>

<script>
var mySelf;
export default {
    data() {
        return {
            user:{
              avatar:'',
              name:'',
              user:'',
 
            }  
        }
    },
    beforeCreate() {
			this.$myUtils.isLoginGotoPage();	
		},
    mounted() {
			mySelf = this;
			this.init();
        },
    methods: {
        init:function() {
            this.user= JSON.parse(mySelf.$myUtils.getStorage('userinfo')) ;
             
        },
        nfQuit:function() {
          window.localStorage.removeItem('userinfo');
          uni.reLaunch({
                    url: '/'
                });

        }
    },
}
</script>